<?php echo $this->load->view('_elements/registratednavigation'); ?>

<?php 
	$display = 'block';
	$visibility = 'visible';
	if($message['inbox_status'] == 'Read') {
		$display='none';
		$visibility = 'hidden';
	} else {
		$display='block'; 
		$visibility = 'visible';
	};
?>

<div id="content">

    <div id="centerbar">
        <div class="titleI"><?php echo $Title; ?></div>
        <div id="prForm" class="blockstyle form">
        	
        	<?php echo form_open('inbox', 'id="post_request" name="post_request" autocomplete="off"')?>
			<?php echo $this->validation->error_string?>
        
        	<div id="prID_Status" class="formElement">
				<div class="blue formText"><?php echo $this->inbox_model->fields['sender']; ?></div>
				<?php echo form_input('member_id', $message['inbox_sender'], 'id="prSender" class="formInput" style="width:100px;" disabled="disabled"')?>
				<div class="blue formText"><?php echo $this->inbox_model->fields['status']; ?></div>
				<?php echo form_input('status', $message['inbox_status'], 'id="prStatus" class="formInput" style="width:100px;" disabled="disabled"')?>
			</div>
			<div id="prReferral_Date" class="formElement">
				<div  style="visibility:<?php echo $visibility ?>">
				<div class="blue formText"><?php echo $this->inbox_model->fields['referral_no']; ?></div>
				<?php echo form_input('referral_no', $message['inbox_referral_no'], 'id="prReferralNo" class="formInput" style="width:100px;" disabled="disabled"')?>
				</div>
				<div class="blue formText"><?php echo $this->inbox_model->fields['date_posted']; ?></div>
				<?php echo form_input('date_posted', $message['inbox_date_posted'], 'id="prDatePosted" class="formInput" style="width:100px;" disabled="disabled"')?>
			</div>
			<div id="prMessageHeader" class="formElement">
				<div class="blue formText"><?php echo $this->inbox_model->fields['message_header']; ?></div>
				<?php echo form_input('message_header', $message['inbox_message_header'], 'class="formInput" style="width:550px;"')?>
			</div>
			<div id="prMessageText" class="formElement">
				<div class="blue formText"><?php echo $this->inbox_model->fields['message_text']; ?></div>
				<?php echo form_textarea('message_text', $message['inbox_message_text'], 'class="formInput" style="width:550px; height:80px;"')?>
			</div>
			<div id="prAskPrice" class="formElement" style="display:<?php echo $display?>">
				<div class="blue formText"><?php echo $this->inbox_model->fields['ask_price']; ?></div>
                <?php echo form_input('ask_price', '$'.$message['inbox_ask_price'], 'id="end_date" class="formInput" size="10" style="width: 130px;"')?>
			</div>
			<div id="prBidPrice" class="formElement" style="display:<?php echo $display?>">
				<div class="blue formText"><?php echo $this->inbox_model->fields['bid_price']; ?></div>
				<?php echo form_input('bid_price', '$'.$message['inbox_bid_price'], 'class="formInput" style="width:100px;"')?>
			</div>
			
            <input type="submit" value="<?php echo T_('BACK'); ?>" name="back" id="prSubmit" class="red buttonStyle"/>
        	<?php echo form_close()?>
        </div>
    </div>
    
 <?php echo $this->load->view('_elements/Followrefs'); ?>
</div>
<script>
	$(function(){
		$('input[type!=submit], textarea').attr('disabled','disabled');
	});
</script>	